﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

using System.Threading;

using MIRIA.Animations;
using MIRIA.UIKit;

namespace MIRIADemo.Pages.MainMenu
{
    public partial class MIGButton : TButton
    {
        public MIGButton()
        {
            InitializeComponent();
        }

        public void Animate()
        {
            Animator.PlayScript(()=>
            {
                while (true)
                {
                    Animator.FxSuperimpose(WiimoteImage, 0.0);
                    Animator.FxSuperimpose(KinectImage, 3.0);
                    Animator.FxSuperimpose(TuioImage, 6.0);
                    Animator.FxSlideLeftIn(TextLine1, 210, 7.0);
                    Animator.FxSlideLeftIn(TextLine2, 210, 8.0);
                    Animator.FxSlideLeftIn(TextLine3, 210, 9.0);
                    Animator.FxFadeOut(TextLine1, 0.5, 12.0);
                    Animator.FxFadeOut(TextLine2, 0.5, 12.0);
                    Animator.FxFadeOut(TextLine3, 0.5, 12.0);
                    Thread.Sleep(14000);
                }
            });
        }

        private void TButton_Loaded(object sender, RoutedEventArgs e)
        {
            
        }
    }
}
